﻿@model MobiShop.Models.Manufacture

@{
    ViewBag.Title = "manufacrureEdit";
    Layout = "~/Views/Shared/_AdminStart.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div class="titleForm">
    <h3>Sửa nhà sản xuất</h3>
</div>

<div>
    <div class="boxCreateLeft"></div>
    <div class ="boxtCreateCenter">
                    @using (Html.BeginForm()) {
                        @Html.ValidationSummary(true)
                        <fieldset>
                            <legend></legend>
                            @Html.HiddenFor(model => model.id)
                            <table>
                                <tr>
                                    <td>@Html.LabelFor(model => model.name)</td>
                                    <td>@Html.EditorFor(model => model.name)
                                        @Html.ValidationMessageFor(model => model.name)</td>
                                </tr>
                                <tr>
                                    <td>@Html.LabelFor(model => model.position)</td>
                                    <td>@Html.EditorFor(model => model.position)
                                        @Html.ValidationMessageFor(model => model.position)</td>
                                </tr>
                                <tr>
                                    <td>@Html.LabelFor(model => model.visible)</td>
                                    <td>@Html.EditorFor(model => model.visible)
                                        @Html.ValidationMessageFor(model => model.visible)</td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>
                                        <input type="hidden" name="ReturnURL" value="@ViewBag.ReturnURL" />
                                        <input type="submit" value="Save" />
                                    </td>
                                </tr>
                            </table>                            
                        </fieldset>
                    }
    </div>  
    <div class="boxCreateRight"></div>
</div>
<div class="linkCommand">
@if (ViewBag.ReturnURL == null)
{
    @Html.ActionLink("Trở về", "manufacrureList")
}
else
{
    <a href="@ViewBag.ReturnURL">Trở về</a>
}
</div>

